package com.lepton.wifidog;

import java.io.IOException;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/gw_message.php")
public class gwMessageHandle extends HttpServlet{
	private static final long serialVersionUID = 5L;
	
	public gwMessageHandle(){
		
	}
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response){
		System.out.println("get method gw_message.php");
		String message = request.getParameter("message");
		if(message != null && message.equals("denied")){
			try {
				response.getWriter().write("denied");
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}
	
	protected void doPost(HttpServletRequest request, HttpServletResponse response){
		System.out.println("post method ping");
	}
}
